package com.java1412.controller;

import com.java1412.service.SchedualServiceHi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author java1412
 * @since 2023-06-06 16:42:00
 */
@RestController
public class HiController {
    @Resource
    private SchedualServiceHi schedualServiceHi;

    @GetMapping("/hi") // localhost:8765/hi?name=java1412
    public String sayHi(@RequestParam(name = "name") String name) {
        System.out.println("feign");
        return schedualServiceHi.sayHiFromClientOne(name);
    }
}
